using System;
using System.Collections.Generic;
using System.Text;

using Db4o.Framework.Interfaces;

namespace SampleBusiness
{
    public class Car : ManagedType
    {
        private string color;
        private int number;

        public int Number
        {
            get { return number; }
            set { number = value; }
        }
	
        public Car(string color) 
        {
            Color = color;
        }
        public Car(string  color, string number) 
        {
            Color = color;
            Number = int.Parse(number);
        }

        public Car()
        {

        }

        public string Color
        {
            get
            {
                return color;
            }
            set
            {
                color = value;
            }
        }

        override public string ToString()
        {
            return string.Format("[{2}] CAR:{1}, {0}", color, number,Id);
        }
    }
}
